//
//  BaseImageView.m
//  WeiDianGuanJia
//
//  Created by 谢英泽 on 2017/4/8.
//  Copyright © 2017年 谢英泽. All rights reserved.
//

#import "BaseImageView.h"
#import "UIImage+Style.h"

@implementation BaseImageView

- (instancetype)init {
    self = [super init];
    if (self) {
        _blur = 1.0;
        self.userInteractionEnabled = YES;
        self.contentMode = UIViewContentModeScaleAspectFill;
        self.layer.masksToBounds = YES;
    }
    return self;
}

- (void)setBlur:(CGFloat)blur {
    _blur = blur;
}

- (void)setImageName:(NSString *)imageName {
    self.image = [UIImage imageNamed:imageName];
}

- (void)setBlurImageName:(NSString *)blurImageName {
    self.image = [UIImage imageWithCoreBlurImage:[UIImage imageNamed:blurImageName] withBlurNumber:_blur];
}

@end
